home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 071-080 / amok79 / script / script.mod < prev    next >
Text File  |  1993-11-04  |  2KB  |  69 lines

  1. (************************************************************************************
  2.  
  3. :Program.       Script
  4.  
  5. :Contents.      führt die Datei <mein Programmname>.exe aus, wobei das Argument
  6. :Contents.      übergeben wird
  7.  
  8. :Usage.         als Default Tool eines Projektes
  9.  
  10.  
  11. :Copyright.     "freely distributable copyrighted software", siehe Anleitung
  12.  
  13. :Author.        Thomas Ansorge
  14.  
  15. :Address.       Dinkelackerring 55, W-6730 Neustadt, Deutschland
  16.  
  17.  
  18. :Language.      Modula-2
  19.  
  20. :Translator.    M2Amiga V4.0 (deutsch)
  21.  
  22.  
  23. :Version.       1.0 vom 06.09.1992
  24.  
  25. :History.       1.0 vom 06.09.1992: Es läuft (<=> es stürzt nicht ab)
  26.  
  27.  
  28. ************************************************************************************)
  29.  
  30.  
  31. MODULE Script;
  32.  
  33. FROM Arguments IMPORT GetArg, NumArgs;
  34.  
  35. FROM DosL IMPORT Execute, Input, Output;
  36.  
  37. FROM String IMPORT Concat;
  38.  
  39. FROM SYSTEM IMPORT ADR;
  40.  
  41. (* ------------------------------------------------------------------------------- *)
  42.  
  43. VAR exeStr: ARRAY [0..255] OF CHAR;
  44.     hilfe : ARRAY [0..255] OF CHAR;
  45.     laenge: INTEGER;
  46.     lint  : LONGINT;
  47.  
  48. (* ------------------------------------------------------------------------------- *)
  49.  
  50. BEGIN (* Modul Script *)
  51.  
  52. IF NumArgs () = 1 THEN
  53.    exeStr := "Execute ";
  54.  
  55.    GetArg (0, hilfe, laenge);
  56.    Concat (exeStr, hilfe);
  57.    Concat (exeStr, ".exe ");
  58.    
  59.    GetArg (1, hilfe, laenge);
  60.    
  61.    IF laenge > 0 THEN
  62.       Concat (exeStr, hilfe);
  63.    
  64.       lint := Execute (ADR (exeStr), Input (), Output ());
  65.    END (* IF laenge *);
  66. END (* IF NumArgs *);
  67.  
  68. END Script (* Modul *).
  69.